<template>
	<view class="content">
		<view class="section-0">
			<view class="section-body">
				<view class="top-tab">
					<view :class="`item ${curTab.id === item.id ? 'item__active' : ''}`" @click="setCurTab(item)" v-for="item in tabList" :key="item.id">
						{{item.name}}<view class="shape"></view>
					</view>
				</view>
				<view class="list">
					<view class="item" v-for="item in 10">
						泰兴500kV变电站保护改造工程泰兴500kV变电站保护改造工程s
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				tabList:[
					{name: '现场履职', id: 1},
					{name: '非现场履职', id: 2},
				],
				curTab: {name: '现场履职', id: 1},
			}
		},
		methods: {
			setCurTab(item) {
				this.curTab = item;
			
			},
		}
	}
</script>

<style lang="scss" scoped>
	.section-0{
		width: 100%;
		background: #2e5efe;
		.section-body{
			width: 100%;
			height: 100%;
			border-top-left-radius: 50rpx;
			border-top-right-radius: 50rpx;
			background-color: #fff;
			overflow: hidden;
			.list{
				padding-top: 12rpx;
				.item{
					width: 100%;
					height: 84rpx;
					line-height: 84rpx;
					border-bottom: solid 2rpx #f2f2f0;
					box-sizing: border-box;
					padding: 0 35rpx;
					text-overflow: ellipsis;
					overflow: hidden;
					white-space: nowrap;
					font-size: 26rpx;
					font-weight: normal;
					font-stretch: normal;
					letter-spacing: 2rpx;
					color: #3b3c40;
				}
			}
			.top-tab{
				width: 670rpx;
				margin-left: 40rpx;
				height: 52rpx;
				line-height: 52rpx;
				display: flex;
				justify-content: space-around;
				box-sizing: border-box;
				padding: 0 30rpx;
				margin-top: 15rpx;
				border-bottom: solid 3rpx #f2f2f0;
				.item{
					font-size: 26rpx;
					font-weight: normal;
					font-stretch: normal;
					line-height: 50rpx;
					letter-spacing: 0rpx;
					color: #d8d8d5;
					position: relative;
					.shape{
						opacity: 0;
						transform: translateY(6rpx);
						position: absolute;
						bottom: -6rpx;
						width: 100%;
						height: 8rpx;
						background-color: #1534ce;
						border-radius: 8rpx;
						transition: 0.3s ease;
					}
				}
				.item__active{
					color: #3b3c40;
					.shape{
						opacity: 1;
						transform: translateY(0rpx);
					}
				}
				
			}
		}
	}
</style>
